package com.prd.service;

import com.prd.dto.AttendanceVocationDTO;
import com.prd.model.AttendanceVocationDO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.prd.util.JsonData;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lizhaoyi
 * @since 2023-10-18
 */
public interface AttendanceVocationService extends IService<AttendanceVocationDO> {

    /**
     *申请假期并启动工作流
     * @param attendanceVocationDTO
     * @return
     */
    JsonData askForVocation(AttendanceVocationDTO attendanceVocationDTO);

    /**
     *
     * 分页查询假期记录
     * @param page
     * @param size
     * @param userId
     * @return
     */
    Map<String, Object> page(int page, int size, String userId);

    /**
     * 查看假期申请详情
     * @param id
     * @param userId
     * @return
     */
    JsonData getDetail(int id, String userId);

    /**
     * 查看工作流程图
     * @param resp
     * @param processId
     */
    void showProcessPic(HttpServletResponse resp, String processId) throws IOException;

    /**
     * 销假
     * @param attendanceVocationDTO
     * @return
     */
    JsonData cancelVocation(AttendanceVocationDTO attendanceVocationDTO);
}
